arm/p2m: Fix regression during domain shutdown with active mem_access
authorTamas K Lengyel <tamas.lengyel@zentific.com>
Wed, 25 Jan 2017 16:12:01 +0000 (09:12 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 27 Jan 2017 01:43:50 +0000 (17:43 -0800)
commitb29aed8b0355fe9f7d49faa9aef12b2f8f983c2c
tree038cd0568519638f56fb935568a8b34249697455
parente1cefedd80f9972854769bfc6e32e23b56cd0712
arm/p2m: Fix regression during domain shutdown with active mem_access

The change in commit 438c5fe4f0c introduced a regression for domains where
mem_acces is or was active. When relinquish_p2m_mapping attempts to clear
a page where the order is not 0 the following ASSERT is triggered:

    ASSERT(!p2m->mem_access_enabled || page_order == 0);

This regression was unfortunately not caught during testing in preparation
for the 4.8 release.

In this patch we adjust the ASSERT to not trip when the domain
is being shutdown.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/p2m.c